package com.chinasofti.exceptiondemo;

import java.text.ParseException;

public class EDemo05 {
    public static void main(String[] args)throws ParseException{
        int arr[] = {1,3,5,6,8,9};
//        arr = null;
        pringArr(arr);
    }
    private static void pringArr(int [] arr){
        if(arr == null){
            System.out.println("参数不能为空");
            throw new NullPointerException();
        }else {
            for(int a:arr){
                System.out.print(a+" ");
            }
        }
    }

}
